package com.d0325;

public class BoxTest<T> {
    private T t;
    public void add(T t){
        this.t=t;
    }
    public T get(){
        return t;
    }

    public static void main(String[] args) {
        BoxTest<Integer> ibx=new BoxTest<Integer>();
        BoxTest<String> sbx=new BoxTest<>();
        ibx.add(new Integer(12));
        sbx.add(new String("word"));
        System.out.println(ibx.get());
        System.out.println(sbx.get());

    }
}
